fix(tables): resource-cell icons, embedded filters, run-state + UI fixes#4789
Conversation
…d fixes
- table-grid: render in-workspace resource URLs (workflow/table/KB/file) as
tagged-resource cells reusing ContextMentionIcon (colored square for
workflows), matching @-mention chips; only the matching list is fetched.
- table-grid: fix row-number sticky cell overflow — reserve the full run/stop
button area (30px, not 16px) so wide row indices don't clip.
- table-grid: show an infinite-scroll loading spinner while the next page
loads instead of looking like the end of the table.
- table: surface sort + filter (and run/stop via the options-bar extras slot)
in the embedded mothership table resource view.
- table-grid/utils: stop the dispatch overlay from optimistically painting
autoRun=false cells Queued for auto-fire dispatches — the dispatcher skips
those groups ('autoRun-off'); manual runs still show Queued (manual-bypass).
- dispatcher: exclude orphan pre-stamps (pending + executionId null) from
countRunningCells so the "X running" badge doesn't stick above zero.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-execution guard - table: de-duplicate the run/stop control in the embedded mothership view — drop TableGrid's own embedded run-status bar; it now lives only in the options bar (left-aligned next to Filter + Sort). Removes the orphaned RunStatusControl import + onStopAll/cancelRunsPending props. - data-row: right-align the row number within its box (hugs the right edge, no hover position jump) with a scaled right inset — 2px for ≤3-digit indices, 4px for 4+ so narrow columns don't look over-padded. - table-grid: require a real executionId in the action bar's canViewExecution flag so an error that never produced an execution (enqueue failure → status 'error', executionId null) doesn't offer "View execution". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Embedded table view always shows Sort + Filter; the run/stop control lives in Run UX accuracy: global “running” count sums the live per-row map (not dispatch scope totals); Queued overlay skips autoRun=false cells on auto-fire dispatches; server Reviewed by Cursor Bugbot for commit 5460850. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR delivers a set of table UI fixes and small features scoped entirely to the tables workspace and the table run dispatcher. The main additions are sim-resource tagged cells (URLs pointing to in-workspace resources now render as chips), embedded sort/filter controls for mothership mode, and an infinite-scroll loading spinner.
Confidence Score: 5/5Safe to merge — all changes are contained to the tables UI and the run dispatcher; no data-path regressions found. Each fix targets a specific, verified defect (orphan pre-stamp over-count in the DB query, autoRun=false optimistic overlay, canViewExecution without a real executionId, cascade badge over-count) and the logic is consistent with the surrounding code. The new SimResourceCell feature is well-guarded (same-workspace check, single enabled query, graceful fallback label). The isFetchingNextPage spinner is correctly placed outside the virtualizer row loop. No untested codepaths or missing guards were found. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Cell value: string] --> B{currentWorkspaceId provided?}
B -- No --> E[extractUrlInfo]
B -- Yes --> C[extractSimResourceInfo]
C --> D{Matches /workspace/wsId/section/resourceId?}
D -- No --> E
D -- Yes --> F{workspaceId == currentWorkspaceId?}
F -- No --> E
F -- Yes --> G[kind: sim-resource]
E --> H{Valid URL?}
H -- Yes --> I[kind: url]
H -- No --> J[kind: text]
G --> K[SimResourceCell renders chip]
K --> L{resourceType?}
L -- workflow --> M[useWorkflows enabled]
L -- table --> N[useTablesList enabled]
L -- knowledge --> O[useKnowledgeBasesQuery enabled]
L -- file --> P[useWorkspaceFiles enabled]
M & N & O & P --> Q[Resolve name from matching list]
Q --> R[ContextMentionIcon + href link]
Reviews (2): Last reviewed commit: "fix(tables): "X running" badge counts ac..." | Re-trigger Greptile |
…abled flag for files query - dispatcher: replace the `not(and(...)) as SQL` cast in countRunningCells with `or(ne(status,'pending'), isNotNull(executionId))` — De Morgan equivalent, fully type-checked, no cast and no hand-written raw SQL. - workspace-files: add an `enabled` option to useWorkspaceFiles; sim-resource cell now passes the real workspaceId with `enabled` instead of '' so the query cache isn't polluted with an empty-key entry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…patch scope The badge derived from `runningCellCount` (the dispatch-scope estimate = rows-ahead × groupCount), which over-counts groups that already finished on rows still inside a dispatch's scope — a cascade where 3 of 4 workflow columns completed read "4 running" instead of "1". Derive `totalRunning` from the live `runningByRowId` map instead (the same per-row source the gutter and action-bar selection already sum), so it reflects cells actually in flight and updates per-cell via SSE rather than only on dispatch-window events. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@greptile review |
Table workspace fixes + a couple of small features, all scoped to the tables UI and the table run dispatcher.
Features
/workspace/{id}/{w|tables|knowledge|files}/{id}) now renders as a tagged-resource chip (icon + name link), reusingContextMentionIcon(the per-workflow colored square for workflows). Only the matching resource list is fetched; other-workspace / external URLs fall back to the existing favicon link.useTablequery options as the full page.Fixes
TableGrid's duplicate embedded run-status bar; it now lives only in the options bar, left-aligned next to Filter + Sort.resolveCellExec) no longer paints autoRun=false cells "Queued" for auto-fire dispatches (the dispatcher skips those per-cell); manual runs still show Queued.countRunningCellsnow excludes orphan pre-stamps (pending+executionIdnull), so the badge doesn't stick above zero when a run failed to enqueue / was orphaned. Verified against prod (tbl_3e51f6414…: 1 → 0).canViewExecutionnow requires a realexecutionId, so an error that never produced an execution (enqueue failure) doesn't offer "View execution" (context menu already gated on this).Test notes
/workspace/{wsId}/w/{id},.../tables/{id},.../knowledge/{id},.../files/{id}into string cells.🤖 Generated with Claude Code